
public class Entry
{
	private double my_income_delta;
	private double my_checking;
	private double my_saving;
	private double my_debt;
	private double my_expense_delta;
	private double my_savings_interest_rate_delta;
	private double my_debt_interest_rate_delta;
	private String my_comment;

	public Entry(final String the_entry_data)
	{
		String[] data = the_entry_data.split(";");

		my_income_delta = Double.parseDouble(data[0].equals("") ? "0" : data[0]);
		my_checking = Double.parseDouble(data[1].equals("") ? "0" : data[1]);
		my_saving = Double.parseDouble(data[2].equals("") ? "0" : data[2]);
		my_debt = Double.parseDouble(data[3].equals("") ? "0" : data[3]);
		my_expense_delta = Double.parseDouble(data[4].equals("") ? "0" : data[4]);
		my_savings_interest_rate_delta = Double.parseDouble(data[5].equals("") ? "0" : data[5]) / 100;
		my_debt_interest_rate_delta = Double.parseDouble(data[6].equals("") ? "0" : data[6]) / 100;
		if (data.length > 7 && data[7] != null)
			my_comment = data[7];
	}

	public double getIncomeDelta()
	{
		return my_income_delta;
	}

	public double getChecking()
	{
		return my_checking;
	}

	public double getSaving()
	{
		return my_saving;
	}

	public double getDebt()
	{
		return my_debt;
	}

	public double getExpense()
	{
		return my_expense_delta;
	}

	public double getSavingsInterestRate()
	{
		return my_savings_interest_rate_delta;
	}

	public double getDebtInterestRate()
	{
		return my_debt_interest_rate_delta;
	}

	public String getComment()
	{
		return my_comment;
	}

	public String toString()
	{
		return my_income_delta + ";" + my_checking + ";" + my_saving + ";"
				+ my_debt + ";" + my_expense_delta + ";"
				+ my_savings_interest_rate_delta + ";"
				+ my_debt_interest_rate_delta + ";" + my_comment;
	}
}
